public class CalculatorDemo {

	public static void main(String[] args) {

		// 2 + 3

		String operand1 = args[0];
		String operator = args[1];
		String operand3 = args[2];

		System.out.println("operand1 = " + operand1);
		System.out.println("operand2 = " + operator);
		System.out.println("operand3 = " + operand3);

		// for Boolean should write Boolean.parseBoolean("true");

		int op1 = Integer.parseInt(operand1);
		int op2 = Integer.parseInt(operand3);

		if (operator.equals("+")) {
			System.out.println("Result = " + (op1 + op2));
		} else if (operator.equals("-")) {
			System.out.println("Result = " + (op1 - op2));
		}

		String sum = operand1 + operand3;
		System.out.println("Sum = " + sum);

	}

}
